import logging

from fastapi import Depends, APIRouter

def verify_token(token: str):
    # 验证逻辑
    logging.info("Verifying token: %s", token)
    return True

# 创建路由器实例
router = APIRouter(prefix="/users", tags=["用户管理"], dependencies=[Depends(verify_token)])

@router.get("/")
async def list_users():
    return [{"id": 1, "name": "Alice"}]

@router.get("/{user_id}")
async def get_user(user_id: int):
    return {"id": user_id, "name": "Alice"}